package com.dpf.player.controller;

import com.dpf.common.pojo.R;
import com.dpf.common.pojo.Team;
import com.dpf.player.service.TeamFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author dpf
 * @version 1.0
 * @date 2023/3/24 10:39
 * @description
 */
@RestController
@RequestMapping("/player")
public class PlayerController {
 //   private static final String REST_URL_PROVIDER_PREFIX = "http://SCSTUDYTEAM";
   /* @Resource
    private RestTemplate restTemplate;*/
    @Resource
    private TeamFeignService teamFeignService;

   /* @GetMapping("/team/list")
    public List<Team> getTeamList(){
        return restTemplate.getForObject(REST_URL_PROVIDER_PREFIX + "/team/list",List.class);
    }*/



    @GetMapping("/team/feignList")
    public R<List<Team>> getTeamListByFeign(){
        return teamFeignService.teamList();
    }

}
